package com.wing.wcabinet.model.response;

import com.wing.product.model.entity.ProductType;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.time.LocalDateTime;
import com.fasterxml.jackson.annotation.JsonFormat;
import java.time.LocalDateTime;
import com.baomidou.mybatisplus.annotation.TableField;
import com.wing.wcabinet.model.entity.WcabCheckedResult;
import java.math.BigDecimal;

/**
 * 盘验结果表VO
 *
 * @author
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
public class WcabCheckedResultVO {

    /**
     * ID
     */
    private Long id;

    /**
     * 创建时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime createTime;

    /**
     * 创建者
     */
    private Long creator;

    /**
     * 修改者
     */
    private Long modifier;

    /**
     * 创建人
     */
    private String creatorName;

    /**
     * 修改人
     */
    private String modifierName;

    /**
     * 状态
     */
    private WcabCheckedResult.Status status;

    /**
    * 状态描述
    */
    @TableField(exist = false)
    private String statusDesc;

    public String getStatusDesc() {
        if(this.status!=null){
            return status.getDesc();
        }
        return null;
    }

    /**
     * 货物状态
     */
    private WcabCheckedResult.BusinessType businessType;

    /**
    * 货物状态描述
    */
    @TableField(exist = false)
    private String businessTypeDesc;

    public String getBusinessTypeDesc() {
        if (this.businessType!=null){
            return businessType.getDesc();
        }
        return "";
    }

    /**
     * 盘验数量
     */
    private Integer quantity;

    /**
     * 重量
     */
    private BigDecimal weight;

    /**
     * 车间id
     */
    private Long workshopId;

    /**
     * 车间名称
     */
    private String workshopName;

    /**
     * 通知时间
     */
    @JsonFormat(timezone = "GMT+8" , pattern = "yyyy-MM-dd HH:mm:ss" )
    private LocalDateTime notifyTime;

    /**
     * 通知用户
     */
    private Long notifyUserId;

    /**
     * 序号
     */
    private Integer no;

    /**
     * 日期
     */
    private Integer day;

    /**
     * 编号
     */
    private String code;

    /**
     * 通知人
     */
    private String notifyUserName;

    /**
     * 通知供应商id
     */
    private Long supplierId;

    /**
     * 通知供应商
     */
    private String supplierName;

    /**
     * 企业id
     */
    private Long companyId;

    /**
     * 盘验前状态：nomal(1,可用);repair(2,维修);recycle(3,回收/报废)
     */
    private WcabCheckedResult.BusinessTypePre businessTypePre;

    /**
     * 是否已经生成订单
     */
    private Boolean isGenOrder;

    /**
     * 是否同步
     */
    private Boolean isSync;

    /**
     * 是否相符，0：否，1：是
     */
    private Boolean isCorrect;

    /**
     * supplierCompanyId
     */
    private String supplierCompanyId;

    /**
     * 是否已经存到维修,0:否，1：是
     */
    private Boolean isStorage;

    /**
     * 盘验任务id
     */
    private Long checkId;

    /**
     * 不符合分类id
     */
    private Long categoryId;

    /**
     * enterpriseId
     */
    private Long enterpriseId;

    /**
     * enterpriseCode
     */
    private String enterpriseCode;




    private String skuCode;

    private String skuName;

    private String skuSpecOld;

    private String cabCode;

    private String spaceCode;

    private Boolean skuCorrect;

    private Boolean businessTypeCorrect;

    private Boolean weightCorrect;

    private Boolean quantityCorrect;

    private String skuCodeChecked;

    private String productName;

    private String oldSpecCode;

    private BigDecimal marketPrice;

    private Integer quantityChecked;

    private BigDecimal weightChecked;

    private ProductType.WeightUnit weightUnit;


    private String weightUnitDesc;


    public String getWeightUnitDesc(){
        if (this.weightUnit!=null){
            return this.weightUnit.getDesc();
        }
        return "";
    }
    private String unitName;

    private String quantityUnitDesc;

    public String getQuantityUnitDesc(){
        if(this.unitName!=null){
            return this.unitName;
        }
        return "";
    }

    private String remark;
}
